﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameBase;

namespace GalaxyPresident
{
    class ClearTask:ConstructionTask
    {
        static VisibleObject bulldozer = new VisibleObject(@"Resources/Bulldozer", 1, 1);
        public ClearTask()
        {
            bulldozer.Sprite.SetOriginPosition(ORIGIN_POSITION.MidBottom);
            bulldozer.Scale = Constant.sizeBlock / 200;
            bulldozer.Depth = 0.7f;
        }
        public override VisibleGameEntity GetDrawingObject()
        {
            return bulldozer;
        }
        public override bool IsAvailable(bool isEmpty)
        {
            return !isEmpty;
        }
        public override bool Execute()
        {
            //base.Execute(planet, blockIndex);
            if (planet != null)
            {
                planet.ClearAtBlock(blockIndex);
            }
            return false;
        }
    }
}
